package vn.com.fsoft.oopai.fsi.rule;

import vn.com.fsoft.oopai.fsi.game.GameState;

/**
 * Class FourthLevelRules. The information about the fourth level rules of game.
 * 
 * @author OOPAI Group
 * 
 */
public class FourthLevelRules extends ThirdLevelRules {

	@Override
	public final boolean checkWin(GameState gameState) {
		return gameState.getTotalToolBreakerFlagged() 
				== gameState.getInitializeNumOfFlag();
	}

	@Override
	public boolean isAbleToMultipleFlag() {
		return false;
	}

	@Override
	public boolean isNumFlagAbleToAdd(GameState gameState, int x, int y) {
		if (gameState.getNumFlag(x, y) == 0) {
			return true;
		}
		return false;
	}
}
